﻿namespace Softserve.Pottery.Store.Domains
{
    using System.Data.Services.Common;
    using System.Runtime.Serialization;
    using Softserve.Pottery.Infrastructure;
    using Softserve.Pottery.Infrastructure.Interfaces;
    
    [DataContract]
    [DataServiceEntity]
    public class Product : IValidatable, IDomain
    {
        public Product() { }

        #region Properties

        [DataMember]
        public int Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }

        [DataMember]
        public string Name
        {
            get { return m_Name; }
            set { m_Name = value; }
        }

        [DataMember]
        public decimal Price
        {
            get { return m_Price; }
            set { m_Price = value; }
        }

        [DataMember]
        public decimal CostPrice
        {
            get { return m_CostPrice; }
            set { m_CostPrice = value; }
        }

        [DataMember]
        public string Description
        {
            get { return m_Decription; }
            set { m_Decription = value; }
        }

        [DataMember]
        public bool IsActive
        {
            get { return m_IsActive; }
            set { m_IsActive = value; }
        }

        [DataMember]
        public bool IsSimple
        {
            get { return m_IsSimple; }
            set { m_IsSimple = value; }
        }

        [DataMember]
        public string[] ImagesPath
        {
            get { return m_ImagesPath; }
            set { m_ImagesPath = value; }
        }

        /// <summary>
        /// Catalog id belongs product
        /// </summary>
		[DataMember]
		public int CatalogId
		{
			get { return m_CatalogId; }
			set { m_CatalogId = value; }
		}
		
        [DataMember]
        public string Size
        {
            get { return m_Size; }
            set { m_Size = value; }
        }

		[DataMember]
		public string Design
		{
			get { return m_Design; }
			set { m_Design = value; }
		}
		
        #endregion

        #region Methods

        public bool Validate()
        {
            return true;
        }

        #endregion

        #region Private fields

        private int m_Id = default(int);

        private string m_Name = string.Empty;

        private decimal m_Price = default(decimal);

        private decimal m_CostPrice = default(decimal);

        private string m_Decription = string.Empty;

        private bool m_IsActive = default(bool);

        private bool m_IsSimple = default(bool);

        private string[] m_ImagesPath = default(string[]);

        private string m_Size = string.Empty;

		private int m_CatalogId = default(int);

		private string m_Design = string.Empty;
        #endregion
    }
}
